<?php
/**
 * Description of menu
 *
 * @author dmitryy
 */
class Controller_Menu extends Controller_Action {
    function index() {
        echo 'Menu Controller is under construction';
    }
    
    function add($id)
    {
        switch ($id) {
            case 'head':
                $this->registry->get('view')->show('addmenuheader');
                break;
            case 'top':
                $this->registry->get('view')->show('addtopmenu');
                break;
            default:
                echo '<div class="alert alert-danger"><h4>Oops, some think wrong... Try again.</h4></div>';
                break;
        }
    }
    
    function adding($id)
    {
        switch ($id) {
            case 'head':
                $this->registry->get('view')->show('addingmenuheader');
                break;
            case 'top':
                $this->registry->get('view')->show('addingtopmenu');
                break;
            default:
                echo '<div class="alert alert-danger"><h4>Oops, some think wrong... Try again.</h4></div>';
                break;
        }
    }
    
    function edit($id)
    {
        $this->registry->get('view')->set('id',$id);
        $this->registry->get('view')->show('editmenuheader');
    }
    
    function editing($id)
    {
        $this->registry->get('view')->set('id',$id);
        $this->registry->get('view')->show('editingmenuheader');
    }
    
    function edittop($id)
    {
        $this->registry->get('view')->set('id',$id);
        $this->registry->get('view')->show('edittopmenu');
    }
    
    function editingtop($id)
    {
        $this->registry->get('view')->set('id',$id);
        $this->registry->get('view')->show('editingtopmenu');
    }
}